<template>
<div class="swiper">
 <swiper :options="swiperOption">
    <swiper-slide v-for="item of list" :key="item.id">
      <img :src="item.imgurl">
    </swiper-slide>
     <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
</div>
 </template>
<script>
export default {
  name: 'HomeCarousel',
  props: {
    list: Array
  },
  data () {
    return {
      swiperOption: {
        autoplay: {
          delay: 2000,
          disableOnInteraction: false
        },
        pagination: {
          el: '.swiper-pagination',
          clickable: true
        },
        loop: true
      }
    }
  }
}
</script>
 <style lang='stylus' scoped="scoped">
  .swiper >>> .swiper-pagination-bullet-active
      background #FFFFFF
  .swiper
     img
        width 100%
 </style>
